<?php
use kartik\form\ActiveForm;
use yii\bootstrap\Html;
use wodrow\yii2wtools\tools\JsBlock;
use yii\helpers\Url;
use common\Tools;
use kartik\select2\Select2;
/**
 * @var \yii\web\View $this
 * @var $model \fztadmin\modules\user\models\forms\CustomBankCard
 * @var $user \common\models\db\User
 */
$user = Yii::$app->user->identity;
$custom = $user->custom;
$fzt = Yii::$app->fenZhangTong;
$this->title = "新增绑卡申请验证";
$fztBanks = [];
foreach (Yii::$app->fenZhangTong->getBanks() as $k => $v) {
    $fztBanks[$v['code']] = "[{$v['code']}]{$v['name']}";
}
?>

    <div>
        <div class="row">
            <div class="col-xs-12">
                <?php $form = ActiveForm::begin(); ?>
                <?=$form->field($model, 'custom_id')->hiddenInput(['value' => $custom->id])->label(false) ?>
                <div class="row">
                    <div class="col-xs-12 col-sm-2">
                        <?=$form->field($model, 'plat_cust_no')->textInput(['readonly' => true, 'value' => $custom->plat_cust_no]) ?>
                    </div>
                    <div class="clearfix"></div>
                    <div class="col-xs-12 col-sm-2">
                        <?=$form->field($model, 'mobile_no')->textInput(['readonly' => true]) ?>
                    </div>
                    <div class="clearfix"></div>
                    <div class="col-xs-12 col-sm-3">
                        <?=$form->field($model, 'open_bank')->widget(Select2::class, [
                            'options' => ['placeholder' => '你可以查询后选择', 'disabled' => true],
                            'data' => $fztBanks,
                        ]); ?>
                    </div>
                    <div class="clearfix"></div>
                    <div class="col-xs-12 col-sm-7">
                        <?=$form->field($model, 'card_no')->textInput(['readonly' => true]) ?>
                    </div>
                    <div class="clearfix"></div>
                    <div class="col-xs-12 col-sm-2">
                        <?=$form->field($model, 'pay_code')->dropDownList($model->getPayCodeDesc(), ['disabled' => true]) ?>
                    </div>
                    <div class="clearfix"></div>
                    <div class="col-xs-12 col-sm-4">
                        <?=$form->field($model, 'oriTransId')->textInput(['readonly' => true]) ?>
                    </div>
                    <div class="clearfix"></div>
                    <div class="col-xs-6 col-sm-2">
                        <?=$form->field($model, 'phoneDynCode')->textInput([]) ?>
                    </div>
                    <div class="clearfix"></div>
                </div>
                <?= Html::submitButton('验证', ['class' => 'btn btn-primary btn-flat']) ?>
                <?php ActiveForm::end(); ?>
            </div>
            <div class="col-xs-12">
            </div>
        </div>
    </div>

<?php JsBlock::begin(); ?>
    <script>
        $(function (){});
    </script>
<?php JsBlock::end(); ?>